<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>操作列表</title>
<link rel="stylesheet" href="css/pintuer.css">
<script src="js/jquery.js"></script>
<script src="js/pintuer.js"></script>
<script src="js/admin.js"></script>
<style> 
body{ text-align:center} 
.div{ margin:0 auto; width:1400px; border:1px solid #F00} 
</style>
</head>
<body>
<jsp:include page="header.jsp" flush="true"> <jsp:param name="name" value="value"/> </jsp:include>
<div class="div">
	<table border="1" >
		<thead>
			<tr width="1400px" height="50px" line-height="50px" border="3">
				<th width="150px">全选<input id="allSellect" type="checkbox" name="checkbox" value="checkbox"></th>
				<th width="250px">id</th>
				<th width="250px">IMG</th>
				<th width="250px">名字</th>
				<th width="250px">路径</th>
				<th width="250px">操作</th>
			</tr>
		</thead>
		<tbody>
		<c:if test="${list.size()!=0}" >
			<c:forEach items="${list}" var = "img">
				<tr height="30px">
					<td><input type="checkbox" name="checkbox" value="${img.id}"></td>
					<td>${img.id}</td>
					<td><img src="${img.imgSrc}"/></td>
					<td>${img.imgOtherName}</td>
					<td>${img.imgSrc}</td>
					<td>
						<a href="deleteServlet?id=${img.id}">删除</a>
						<a>修改</a>
					</td>
				</tr>
			</c:forEach>
		</c:if>
		</tbody>
	</table>
	<button id="delete" style="float:left">批量删除</button>
</div>
</body>
<script type="text/javascript">
        $(function () {
            $("#delete").on({
               /* mouseout: function () {
                    alert("这是mouseout事件!");
                },*/
                click: function () {
                	var aa=""; 
                	$("input[name='checkbox']:checkbox:checked").each(function(){ 
                	aa+=$(this).val()+"," ;
                	}) 
                	var arr = aa.split(",");
                	console.log(typeof(arr)+arr); 
                }
            });
        });
    </script>
</html>